<template>
    <div>
        <div class="xx">
            <h3>商品添加</h3>
            <br/>
            商品名称:
            <input type="text" v-model="aa"/><br/><br/>
            商品价格:
            <input type="number" v-model="aa"/><br/><br/>
            商品库存:
            <input type="number" v-model="aa"/><br/>
            <br/>
            <router-link to="/shop" class="x"><button type="submit" @click="bb">新增</button></router-link>
            <router-link to="/shop" class="x"><button type="button" @click="cancelEdit">取消</button></router-link>
        </div>
    </div>
</template>

<script>
export default {
    name:"Add",
    method:{
        bb(){
            this.$emit('abc', this.aa)
        }
    }
}
</script>

<style>
    .xx{
        background-color: aliceblue;
        border-radius: 35px;
        height: 600px;
        width: 600px;
        margin-left: 300px;
        margin-top: 50px;
        text-align: center;
    }
</style>